package com.starlink.model.util;

import com.starlink.model.dtomapper.SchoolbagGroupDtoMapper;
import com.starlink.model.domain.SchoolbagGroupDO;
import com.starlink.model.vo.SchoolbagGroupVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class SchoolbagGroupConvert {

    public static List<SchoolbagGroupVO> buildSchoolbagGroupVoList(List<SchoolbagGroupDO> schoolbagGroupDOList) {
        if (CollectionUtils.isEmpty(schoolbagGroupDOList)) {
            return Lists.newArrayList();
        }
        List<SchoolbagGroupVO> schoolbagGroupVOList = new ArrayList<>();
        for (SchoolbagGroupDO schoolbagGroupDO : schoolbagGroupDOList) {
            schoolbagGroupVOList.add(SchoolbagGroupDtoMapper.INSTANCE.do2VO(schoolbagGroupDO));
        }

        return schoolbagGroupVOList;
    }
}
